package lab02.test11;

//import java.util.Scanner;

public class Test11 {
    public static void main(String[] args) {
     /*   Scanner sc = new Scanner(System.in);
        System.out.println("请输入矩形的长：");
        double height = sc.nextDouble();

        System.out.println("请输入矩形的宽：");
        double width = sc.nextDouble();*/  //如何任意输入一个值来用方法

        //矩形的面积与周长
        Rectangle rectangle = new Rectangle();
        rectangle.length = 20;
        rectangle.width = 10;
        rectangle.area();
        rectangle.perimeter();
        rectangle.printMyWay();

        //正方形的面积、周长、对角线
        Square square = new Square();
        square.length = 20;
        System.out.println("-----------------");
        square.diagonal();
        square.printMyWay();

    }
}
